package zuoye14;

import java.util.Scanner;

public class zy4 {
//    4：输入一个5位整数，求他们每一位上数字的和，并输出
     public static void main(String[] args) {
         Scanner s = new Scanner(System.in);
         System.out.println("请输入一个五位数");
         int x = s.nextInt();
         double ge   = x%10;
         double shi  = x/10%10;
         double bai  = x/100%10;
         double qian = x/1000%10;
         double wan  = x/10000%10;
         double he = ge+shi+bai+qian+wan;
         System.out.println("和为:"+he);
}
}
